<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<s:include value="/commun/header.jsp" />
<div id="body">
<s:if test="!#session.connect">
<p>Connexion a votre espace personnel</p>
<s:if test="hasActionErrors()">
   <div class="errors">
      <s:actionerror/>
   </div>
</s:if>
<s:form>

<p>
<s:textfield label="Login" name="utilisateur.login"/>
</p>
<p>
<s:password label="Mot de passe" name="utilisateur.motdepasse"/>
</p>
<p>
<s:submit action="login" value="ok" />
</p>
</s:form>
</s:if>
<s:else>
	<s:if  test="%{#session.role=='client'}">
		<s:url id="espacePerso" action="clientProfil"><s:param name="client.id" value="%{#session.rid}"/></s:url>
		<s:a href="%{espacePerso}">Mon profil</s:a><br />
	</s:if>
	<s:else>
		<s:url id="espacePerso" action="agentProfil"><s:param name="agent.id" value="%{#session.rid}"/></s:url>
		<s:a href="%{espacePerso}">Mon profil</s:a><br />
	</s:else>
	
	<s:url id="disconnect" action="disconnect"/>
	<s:a href="%{disconnect}">Se déconnecter</s:a><br />
</s:else>
</div>
<s:include value="/commun/footer.jsp" />